function searchMe(str){
    var xmlhttp;
    if (str == 0) {
		document.getElementById("txt1").innerHTML = "";
		return;
	}
    if (window.XMLHttpRequest) {
        //code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    }
    else {
        //code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
	if (str.length > 2) {
	xmlhttp.open("GET", "ajaxsearch.php?s=" + str, true);
    xmlhttp.send();
    xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("txtSearch").innerHTML = xmlhttp.responseText;
        } else {
			document.getElementById("txtSearch").innerHTML = "<img src=\"/images/search_loader.gif\" alt=\"...\" />&nbsp;";
		}
	}
		
    }
    //xmlhttp.open("GET", "ajaxsearch.php?s=" + str, true);
    //xmlhttp.send();
}
        function showHide() {
            var hide = document.getElementById("txtSearch").style;
            if (hide.visibility == "hidden")
                hide.visibility = "visible";
            else
                hide.visibility = "hidden";
        }
		
		function time() {
			var date = new Date();
			var hours = date.getHours();
			var mins = date.getMinutes();
			var secs = date.getSeconds();
			var fulltime = hours + ":" + mins + ":" + secs; 
			document.getElementById("txtSearch").innerHTML = fulltime;
		}
		function clearDef(el) {
			if (el.defaultValue == el.value) 
				el.value = "";
		}

function loadercheck() {
  // display loading image here...
  document.getElementById("loadingImg").style.display = "block";
  document.getElementById("content").style.display = 'none';
  // request your data...
  var req =  new XMLHttpRequest();
  req.open("GET", "search.php?s=null", true);
  req.send();
  req.onreadystatechange = function(){
  	if (req.readyState == 4 && req.status == 200) {
  		// content is loaded...hide the gif and display the content...
				if (req.responseText) {
					//document.getElementById("content").innerHTML = "<img src=\"/images/load.gif\" alt=\"...\" />";
					document.getElementById("content").style.display = 'block';
					document.getElementById("loadingImg").style.display = "none";
				}
			}
		}
		
}